﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace DCSElab_Project
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Slice_Dialog : Window
    {
        private double dz;
        private double dm;
        private double dx;
        private double dy;

        public Slice_Dialog()
        {
            InitializeComponent();
        }
        public void Setdz(double value)
        {
            dz = value;
        }
        public void Setdm(double value)
        {
            dm = value;
        }
        public void Setdx(double value)
        {
            dx = value;
        }
        public void Setdy(double value)
        {
            dy = value;
        }
        public double Getdz()
        {
            return dz;
        }
        public double Getdm()
        {
            return dm;
        }
        public double Getdx()
        {
            return dx;
        }
        public double Getdy()
        {
            return dy;
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Setdz( Double.Parse(textBox1.Text));
                Setdm( Double.Parse(textBox2.Text));
                Setdx(Double.Parse(textBoxX.Text));
                Setdy(Double.Parse(textBoxY.Text));
                DialogResult = true;
            }
            catch
            { }

        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
            this.Close();
        }
    }
}
